package cn.javabb.core.mapper.biz;


import cn.javabb.core.query.PostQuery;
import cn.javabb.core.base.BaseMapper;
import cn.javabb.core.entity.biz.PostDO;
import cn.javabb.core.bo.PostBO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 帖子Mapper
 */
@Repository
public interface PostMapper extends BaseMapper<PostDO> {

    //public List<ArticleBO> listArticlesCondition(Map map);
    /*统计板块的今日帖子数和评论数*/
    public Integer countTodayPostAndComment(@Param(value="catalogId")Integer catalogId);

    public List<PostBO> queryPage(PostQuery query);

    public List<PostDO> listPosts(PostQuery query);

    public PostBO get(Integer id);

    /**
     * 最新评论帖子列表
     * @param size
     * @return
     */
    public List<PostDO> listCommentPosts(@Param(value = "size") Integer size);
}